﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DAL;

/// <summary>
/// Summary description for ReportBO
/// </summary>
public class ReportBO : DB_SAPDataContext
{
    public ReportBO()
    {
        //
        // TODO: Add constructor logic here
        //
    }
    public List<PRC_DTP_REPORT_TESTResult> Report_Test()
    {
        try
        {
            List<PRC_DTP_REPORT_TESTResult> result = new List<PRC_DTP_REPORT_TESTResult>();
            // result = PRC_DTP_REPORT_TEST().ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }
    public List<ZD_PRC_DAILYREPORTResult> Report_Daily()
    {
        try
        {
            List<ZD_PRC_DAILYREPORTResult> result = new List<ZD_PRC_DAILYREPORTResult>();
            result = ZD_PRC_DAILYREPORT().ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }
    public List<ZD_PRC_ACTUALSALESResult> Report_ActualSales(DateTime tuNgay, DateTime denNgay)
    {
        try
        {
            List<ZD_PRC_ACTUALSALESResult> result = new List<ZD_PRC_ACTUALSALESResult>();
            result = ZD_PRC_ACTUALSALES(tuNgay, denNgay).ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }
    public List<ZD_PRC_ACTUALSALES_HCM_FHSResult> Report_ActualSales_HCM_FHS(DateTime tuNgay, DateTime denNgay)
    {
        try
        {
            List<ZD_PRC_ACTUALSALES_HCM_FHSResult> result = new List<ZD_PRC_ACTUALSALES_HCM_FHSResult>();
            result = ZD_PRC_ACTUALSALES_HCM_FHS(tuNgay, denNgay).ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }

    public List<ZD_PRC_PENDING_ORDERSResult> Report_PendingOrders()
    {
        try
        {
            List<ZD_PRC_PENDING_ORDERSResult> result = new List<ZD_PRC_PENDING_ORDERSResult>();
            result = ZD_PRC_PENDING_ORDERS().ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }
    public List<ZD_PRC_RPT_MATHANG_TONKHO_THEOKHOResult> Report_MatHangTonKho()
    {
        try
        {
            List<ZD_PRC_RPT_MATHANG_TONKHO_THEOKHOResult> result = new List<ZD_PRC_RPT_MATHANG_TONKHO_THEOKHOResult>();
            result = ZD_PRC_RPT_MATHANG_TONKHO_THEOKHO().ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }
    public List<ZD_PRC_RPT_SO_THIEUResult> Report_So_Thieu(char status,DateTime tuNgay, DateTime denNgay)
    {
        try
        {
            List<ZD_PRC_RPT_SO_THIEUResult> result = new List<ZD_PRC_RPT_SO_THIEUResult>();
            result = ZD_PRC_RPT_SO_THIEU(status,tuNgay,denNgay).ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }

    public List<usp_RPT_SAL_DanhSoChiTietMatHangResult> Report_DoanhThu_ChiTiet_MatHang(string phapnhan, DateTime tuNgay, DateTime denNgay)
    {
        try
        {
            List<usp_RPT_SAL_DanhSoChiTietMatHangResult> result = new List<usp_RPT_SAL_DanhSoChiTietMatHangResult>();
            result = usp_RPT_SAL_DanhSoChiTietMatHang(phapnhan, tuNgay, denNgay).ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }

    public List<ZD_PRC_DOANHTHUTHEOKHUVUCResult> Report_DoanhThu_Theo_KhuVuc(string nam,string phapnhan)
    {
        try
        {
            List<ZD_PRC_DOANHTHUTHEOKHUVUCResult> result = new List<ZD_PRC_DOANHTHUTHEOKHUVUCResult>();
            result = ZD_PRC_DOANHTHUTHEOKHUVUC(int.Parse(nam),phapnhan).ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }

    public List<ZD_PRC_CHIPHIResult> Report_ChiPhi(string nam, string phapnhan)
    {
        try
        {
            List<ZD_PRC_CHIPHIResult> result = new List<ZD_PRC_CHIPHIResult>();
            result = ZD_PRC_CHIPHI(int.Parse(nam), phapnhan).ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }

    public List<ZD_PRC_LANDEDCOST_GETALLResult> Report_LandedCost_GetAll()
    {
        try
        {
            List<ZD_PRC_LANDEDCOST_GETALLResult> result = new List<ZD_PRC_LANDEDCOST_GETALLResult>();
            result = ZD_PRC_LANDEDCOST_GETALL().ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }

    public List<ZD_PRC_LANDEDCOST_GETALL_SHEET2Result> Report_LandedCost_GetAll_Total()
    {
        try
        {
            List<ZD_PRC_LANDEDCOST_GETALL_SHEET2Result> result = new List<ZD_PRC_LANDEDCOST_GETALL_SHEET2Result>();
            result = ZD_PRC_LANDEDCOST_GETALL_SHEET2().ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }

    public List<ZD_PRC_GIAVONHANGBANResult> Report_GiaVon(string nam, string phapnhan)
    {
        try
        {
            List<ZD_PRC_GIAVONHANGBANResult> result = new List<ZD_PRC_GIAVONHANGBANResult>();
            result = ZD_PRC_GIAVONHANGBAN(int.Parse(nam), phapnhan).ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }

    public List<ZD_PRC_UNITSALEResult> Report_UnitSale(string nam, string phapnhan)
    {
        try
        {
            List<ZD_PRC_UNITSALEResult> result = new List<ZD_PRC_UNITSALEResult>();
            result = ZD_PRC_UNITSALE(int.Parse(nam), phapnhan).ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }

    public List<usp_RPT_SAL_DanhSoChiTietMatHangTheoThangResult> Report_DoanhThu_ChiTiet_MatHang_Thang(string phapnhan, DateTime tuNgay, DateTime denNgay)
    {
        try
        {
            List<usp_RPT_SAL_DanhSoChiTietMatHangTheoThangResult> result = new List<usp_RPT_SAL_DanhSoChiTietMatHangTheoThangResult>();
            result = usp_RPT_SAL_DanhSoChiTietMatHangTheoThang(phapnhan, tuNgay, denNgay).ToList();
            return result;
        }
    catch (Exception ex)
        {
            return null;
        }
    }
    public List<usp_INV_TonghopNXT_WebResult> Report_TongHop_XuatNhap_Ton(string phapnhan,string kho, DateTime tuNgay, DateTime denNgay)
    {
        try
        {
            List<usp_INV_TonghopNXT_WebResult> result = new List<usp_INV_TonghopNXT_WebResult>();
            result = usp_INV_TonghopNXT_Web(phapnhan, kho, tuNgay, denNgay).ToList();
            return result;
        }
        catch (Exception ex)
        {
            return null;
        }
    }
}